package net.lulihu.common_util.fastJson;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * fast json 集中式配置
 */
@Slf4j
@Configuration
public class FastJsonHttpMessageConfig {

    public FastJsonHttpMessageConfig() {
        if (log.isInfoEnabled())
            log.info("fast json HTTP 消息配置开始加载...");
    }

    /**
     * fastJson 请求结果消息转换器配置
     */
    @Bean
    public FastJsonHttpMessageConverterConfig fastJsonHttpMessageConverterConfig() {
        return new FastJsonHttpMessageConverterConfig();
    }

    /**
     * fastJson请求参数解析器配置
     */
    @Bean
    public FastJsonHttpMessageResolverConfig fastJsonHttpMessageResolverConfig() {
        return new FastJsonHttpMessageResolverConfig();
    }

}
